package com.yonyou.cyxdms.basedata.service.entity.option;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 选装
 * </p>
 *
 * @author zys
 * @since 2020-02-10
 */
@TableName("tm_vs_option")
public class VsOptionPO extends DMSBasePO<VsOptionPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 选装ID
     */
        @TableId(value = "OPTION_ID", type = IdType.AUTO)
        private Long optionId;
        
        /**
         * APP_ID
         */
        @TableField("APP_ID")
        private String appId;
    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;
    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;
    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;
    /**
     * 配置ID
     */
    @TableField("PACKAGE_ID")
    private Long packageId;
    /**
     * 选装编号
     */
    @TableField("OPTION_CODE")
    private String optionCode;
    /**
     * 选装名称
     */
    @TableField("OPTION_NAME")
    private String optionName;
    /**
     * 数据来源
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;
    
    /**
     * 上游数据来源ID
     */
    @TableField("SOURCE_ID")
    private String sourceId;

    @TableField("SOURCE_CHANGED_AT")
    private LocalDateTime sourceChangedAt;

    /**
     * 是，否
     */
    @TableField("IS_VALID")
    private Integer isValid;
    
    /**
     * 是否删除(0:未删除1:删除)
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    @TableField("CREATED_BY")
    private String createdBy;

    @TableField("CREATED_AT")
    private LocalDateTime createdAt;

    @TableField("START_DATE")
    private LocalDateTime startDate;

    @TableField("IS_ISSUE")
    private Integer isIssue;

    @TableField("SEND_DATE")
    private LocalDateTime sendDate;
    
    @TableField("SEND_BY")
    private String sendBy;

    @TableField("DEALER_PRICE")
    private BigDecimal dealerPrice;

    @TableField("OEM_PRICE")
    private BigDecimal oemPrice;
    
    public VsOptionPO() {
        super();
    }


    public Long getOptionId() {
        return optionId;
    }

    public void setOptionId(Long optionId) {
        this.optionId = optionId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    public Long getPackageId() {
        return packageId;
    }

    public void setPackageId(Long packageId) {
        this.packageId = packageId;
    }

    public String getOptionCode() {
        return optionCode;
    }

    public void setOptionCode(String optionCode) {
        this.optionCode = optionCode;
    }

    public String getOptionName() {
        return optionName;
    }

    public void setOptionName(String optionName) {
        this.optionName = optionName;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }
    
    public String getAppId() {
		return appId;
	}


	public void setAppId(String appId) {
		this.appId = appId;
	}
	

	public Integer getDataSources() {
		return dataSources;
	}


	public void setDataSources(Integer dataSources) {
		this.dataSources = dataSources;
	}


	public String getSourceId() {
		return sourceId;
	}


	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}


	public LocalDateTime getSourceChangedAt() {
		return sourceChangedAt;
	}


	public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
		this.sourceChangedAt = sourceChangedAt;
	}


	public Integer getIsValid() {
		return isValid;
	}


	public void setIsValid(Integer isValid) {
		this.isValid = isValid;
	}


	@Override
    protected Serializable pkVal() {
        return this.optionId;
    }

    @Override
    public String getCreatedBy() {
        return createdBy;
    }

    @Override
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Override
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    @Override
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }
    

	public Integer getIsIssue() {
		return isIssue;
	}


	public void setIsIssue(Integer isIssue) {
		this.isIssue = isIssue;
	}


	public LocalDateTime getSendDate() {
		return sendDate;
	}


	public void setSendDate(LocalDateTime sendDate) {
		this.sendDate = sendDate;
	}


	public String getSendBy() {
		return sendBy;
	}


	public void setSendBy(String sendBy) {
		this.sendBy = sendBy;
	}

    public BigDecimal getDealerPrice() {
        return dealerPrice;
    }

    public void setDealerPrice(BigDecimal dealerPrice) {
        this.dealerPrice = dealerPrice;
    }

    public BigDecimal getOemPrice() {
        return oemPrice;
    }

    public void setOemPrice(BigDecimal oemPrice) {
        this.oemPrice = oemPrice;
    }

    @Override
	public String toString() {
		return "VsOptionPO [optionId=" + optionId + ", appId=" + appId + ", companyCode=" + companyCode + ", ownerCode="
				+ ownerCode + ", ownerParCode=" + ownerParCode + ", packageId=" + packageId + ", optionCode="
				+ optionCode + ", optionName=" + optionName + ", dataSources=" + dataSources + ", sourceId=" + sourceId
				+ ", sourceChangedAt=" + sourceChangedAt + ", isValid=" + isValid + ", startDate=" + startDate + ", isDeleted=" + isDeleted + "]";
	}


	/**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author zys
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "optionId");
    }


}
